<template>
  <div class="articlecard-container">
    <div class="header">{{article.title}}</div>
    <div class="label">
      <span>Ant Design</span>
      <span>设计语言</span>
    </div>
    <div class="desc">{{article.content | flierContent}}</div>
    <div class="from">
      <img :src="article.url" alt srcset />
      <div class="name">{{article.name}}</div>
      <div>发布在</div>
      <div class="local">{{article.loacl}}</div>
      <div class="time">{{article.time}}</div>
    </div>
    <div class="footer">
      <span class="footer-item">
        <i class="el-icon-star-off"></i>
        {{article.coll}}
      </span>
      <span class="footer-item">
        <i class="el-icon-share"></i>
        {{article.share}}
      </span>
      <span class="footer-item">
        <i class="iconfont iconnews"></i>
        {{article.say}}
      </span>
    </div>
  </div>
</template>


<script>
export default {
  props: ["article"],
  data() {
    return {};
  },
  filters:{
    flierContent(v){
      return v.substring(0,220) + '...'
    }
  }
};
</script>


<style lang="scss" scoped>
.articlecard-container {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #e7e4e4;
  padding: 10px;
  height: 233px;
  .header {
    font-size: 18px;
    font-weight: bold;
  }
  .label {
    display: flex;
    flex-direction: row;
    margin: 15px 0;
    span {
      border: 1px solid #d9d9d9;
      font-size: 12px;
      padding: 5px;
      border-radius: 8px;
      display: inline-block;
      margin-right: 15px;
    }
  }
  .desc {
    font-size: 14px;
    color: rgb(89, 89, 89);
    width: 68%;
    line-height: 25px;
  }
  .from {
    display: flex;
    flex-direction: row;
    height: 30px;
    margin: 10px 0;
    line-height: 30px;
    img {
      width: 24px;
      height: 24px;
      border-radius: 50%;
    }
    .name,
    .local {
      color: #1890ff;
      margin: 0 8px;
    }
    .time {
      margin: 0 20px;
      color: #999;
    }
  }
  .footer {
    display: flex;
    flex-direction: row;
    margin-top: 15px;
    .footer-item {
      border-right: 1px solid #d9d9d9;
      padding: 0 15px;
      color: #999;
      font-size: 18px;
      cursor: pointer;
    }
  }
}
</style>
